##  Copyright (C) 2010 Fredrique Samuels, fredriquesamuels@gmail.com 
##
##
##  This program is free software; you can redistribute it and/or modify
##  it under the terms of the GNU General Public License as published by
##  the Free Software Foundation; either version 2 of the License, or
##  (at your option) any later version.
##
##  This program is distributed in the hope that it will be useful,
##  but WITHOUT ANY WARRANTY; without even the implied warranty of
##  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
##  GNU General Public License for more details.
##
##  You should have received a copy of the GNU General Public License
##  along with this program; if not, write to the Free Software
##  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

import os,sys

#===========================================================

def addPThreads(prj,trg=None):
    if sys.platform == 'win32':
        include = [r'C:/Program Files/Pthreads-win32/Pre-built.2/include']
        lib_dirs = [r'C:/Program Files/Pthreads-win32/Pre-built.2/lib']
        libs = ['pthreadGC2']
        cpp = []
        flags = ['O3','Wall','fmessage-length=0']
        macros = []
        
        prj.add(trg,
                CPP = cpp,
                FLAGS = flags,
                MACRO = macros,
                INC = include,
                LIB_DIR = lib_dirs,
                LIBS = libs)

#===========================================================

def addGLUT(prj,trg=None):
    if sys.platform == 'win32':
        include = [r'c:/Program Files/glut/'+prj.getEnviroment()]
        lib_dirs = [r'c:/Program Files/glut/'+prj.getEnviroment()]
        libs = ['glut32','opengl32','winmm','gdi32', 'glu32']
        cpp = []
        flags = ['O3','Wall','fmessage-length=0']
        macros = []
        
        prj.add(trg,
                CPP = cpp,
                FLAGS = flags,
                MACRO = macros,
                INC = include,
                LIB_DIR = lib_dirs,
                LIBS = libs)

#===========================================================

def addTriangulum(prj,trg=None):

    if sys.platform == 'win32':
        include = [r'c:/Program Files/Triangulum/include']
        lib_dirs = [r'c:/Program Files/Triangulum/lib']
        libs = ['triangulum','ws2_32']
        cpp = []
        flags = []
        macros = []
        
        prj.add(trg,
                CPP = cpp,
                FLAGS = flags,
                MACRO = macros,
                INC = include,
                LIB_DIR = lib_dirs,
                LIBS = libs)
    
